package com.kinghood.productcenter.dao.product;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kinghood.productcenter.common.model.dao.product.ProductSkuBaseDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kinghood.productcenter.common.model.dto.base.SkuQueryPageReqDTO;
import com.kinghood.productcenter.common.model.dto.sku.GetProductSkuReqDTO;
import com.kinghood.productcenter.common.model.dto.sku.SkuDTO;
import com.kinghood.productcenter.common.model.vo.base.AttributeNameVO;
import com.kinghood.productcenter.common.model.vo.product.ProductListVO;
import com.kinghood.productcenter.common.model.vo.product.ProductSkuListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author KingHood
 * @since 2023-12-20
 */
public interface ProductSkuBaseMapper extends BaseMapper<ProductSkuBaseDO> {

    /**
     * sku编码
     *
     * @return sku编码
     * @author zfj
     * @date 2023/12/28
     */
    List<String> getSkuCodeList(@Param("productId") Long productId);

    /**
     * 获取sku信息
     *
     * @param in id
     * @return sku
     * @author zfj
     * @date 2024/1/22
     */
    List<SkuDTO> getProductSku(@Param("data") GetProductSkuReqDTO in);

    /**
     * sku列表
     *
     * @param page 页
     * @param in   在里面
     * @return @return {@link Page }<{@link ProductListVO }>
     * @author jp
     * @date 2024/01/22 17:45
     */
    Page<ProductSkuListVO> queryPage(Page<Object> page, @Param("param") SkuQueryPageReqDTO in);

    /**
     * 获取sku属性
     *
     * @return @return {@link List }<{@link AttributeNameVO }>
     * @author jp
     * @date 2024/01/23 15:49
     */
    List<AttributeNameVO> getSkuAttribute();
}
